package com.qdlc.p2p.dal.model;

import java.io.Serializable;
import java.util.Map;

import com.qdlc.p2p.dal.dto.User;

/**
 * Created by liaoxiangkai on 2015/11/16.
 */
public class BaseGiveAwardModel implements Serializable {

    //1:红包 2:体验券 3:加息券 4:抽奖 5:电影票,6:商品,7:酒券
    public static final int RULE_TYPE_REDENVELOPE = 1;

    public static final int RULE_TYPE_EXPERIENCE = 2;

    public static final int RULE_TYPE_UPRATE = 3;

    public static final int RULE_TYPE_LOTTERY = 4;

    public static final int RULE_TYPE_MOVIETICKET = 5;

    public static final int RULE_TYPE_COMMODITY = 6;

    public static final int RULE_TYPE_WINE_COUPONS = 7;

    /**
     * 邀请好友id
     */
    private long beInvitedUserId;
    /**
     * 奖励大小
     */
    private double amount;
    /**
     * 活动环节：签到环节，注册环节，…(register,invite,tender,first_tender,sign)
     */
    private String sourceType;
    /**
     * 有效期
     */
    private int validDay;
    /**
     * 规则类型
     */
    private int ruleType;
    /**
     * 规则id,商品id
     */
    private long ruleId;
    /**
     * 关联的用户
     */
    private User user;

    /**
     * 活动赠送描述
     */
    private String description;

    /**
     * 额外参数
     */
    private Map<String, Object> extMpas;
    
    /** 使用规则-标期限：1,2,3 */
    private String timeLimit;
    
    /** 使用规则-投标最小金额 */
    private double maxTenderAmount;
    
    /** 使用规则-投标最大金额 */
    private double minTenderAmount;
    
    /** 数量 */
    private int number;

    public BaseGiveAwardModel() {
    }

    public BaseGiveAwardModel(User user, double amount, String sourceType, int validDay, String description) {
        this.amount = amount;
        this.sourceType = sourceType;
        this.validDay = validDay;
        this.user = user;
        this.description = description;
    }


    public long getBeInvitedUserId() {
        return beInvitedUserId;
    }

    public void setBeInvitedUserId(long beInvitedUserId) {
        this.beInvitedUserId = beInvitedUserId;
    }

    public double getAmount() {
        return amount;
    }

    public void setAmount(double amount) {
        this.amount = amount;
    }

    public String getSourceType() {
        return sourceType;
    }

    public void setSourceType(String sourceType) {
        this.sourceType = sourceType;
    }

    public int getValidDay() {
        return validDay;
    }

    public void setValidDay(int validDay) {
        this.validDay = validDay;
    }

    public int getRuleType() {
        return ruleType;
    }

    public void setRuleType(int ruleType) {
        this.ruleType = ruleType;
    }

    public long getRuleId() {
        return ruleId;
    }

    public void setRuleId(long ruleId) {
        this.ruleId = ruleId;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Map<String, Object> getExtMpas() {
        return extMpas;
    }

    public void setExtMpas(Map<String, Object> extMpas) {
        this.extMpas = extMpas;
    }

	/**
	 * @return timeLimit
	 */
	public String getTimeLimit() {
		return timeLimit;
	}

	/**
	 * @param timeLimit 要设置的 timeLimit
	 */
	public void setTimeLimit(String timeLimit) {
		this.timeLimit = timeLimit;
	}

	/**
	 * @return maxTenderAmount
	 */
	public double getMaxTenderAmount() {
		return maxTenderAmount;
	}

	/**
	 * @param maxTenderAmount 要设置的 maxTenderAmount
	 */
	public void setMaxTenderAmount(double maxTenderAmount) {
		this.maxTenderAmount = maxTenderAmount;
	}

	/**
	 * @return minTenderAmount
	 */
	public double getMinTenderAmount() {
		return minTenderAmount;
	}

	/**
	 * @param minTenderAmount 要设置的 minTenderAmount
	 */
	public void setMinTenderAmount(double minTenderAmount) {
		this.minTenderAmount = minTenderAmount;
	}

	/**
	 * @return number
	 */
	public int getNumber() {
		return number;
	}

	/**
	 * @param number 要设置的 number
	 */
	public void setNumber(int number) {
		this.number = number;
	}
}
